load("@rules_cc//cc:cc_library.bzl", "cc_library")

cc_library(
    name = "boost.interprocess",
    hdrs = glob(
        ["include/**/*.hpp"],
        exclude = [
            "include/boost/interprocess/allocators/detail/**/*.hpp",
            "include/boost/interprocess/detail/**/*.hpp",
            "include/boost/interprocess/managed_heap_memory.hpp",
            "include/boost/interprocess/managed_windows_shared_memory.hpp",
            "include/boost/interprocess/segment_manager.hpp",
            "include/boost/interprocess/sync/posix/*.hpp",
            "include/boost/interprocess/sync/spin/interprocess_barrier.hpp",
            "include/boost/interprocess/sync/upgradable_lock.hpp",
            "include/boost/interprocess/sync/windows/*.hpp",
            "include/boost/interprocess/windows_shared_memory.hpp",
        ],
    ),
    features = [
        "parse_headers",
    ],
    includes = ["include"],
    textual_hdrs = [
        "include/boost/interprocess/managed_heap_memory.hpp",
        "include/boost/interprocess/managed_windows_shared_memory.hpp",
        "include/boost/interprocess/segment_manager.hpp",
        "include/boost/interprocess/sync/spin/interprocess_barrier.hpp",
        "include/boost/interprocess/sync/upgradable_lock.hpp",
        "include/boost/interprocess/windows_shared_memory.hpp",
    ] + glob([
        "include/boost/interprocess/allocators/detail/**/*.hpp",
        "include/boost/interprocess/detail/**/*.hpp",
        "include/boost/interprocess/sync/posix/*.hpp",
        "include/boost/interprocess/sync/windows/*.hpp",
    ]),
    visibility = ["//visibility:public"],
    deps = [
        "@boost.assert",
        "@boost.config",
        "@boost.container",
        "@boost.intrusive",
        "@boost.move",
        "@boost.winapi",
    ],
)
